home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / resource / xprinter / xprinter.prolog < prev   
Encoding:
Text File  |  1997-07-08  |  2.0 KB  |  142 lines

  1. /XPrinterDict dup 200 dict def load begin
  2. /bdf{bind def}bind def
  3. /ldf{load def}bdf
  4. /m/rmoveto ldf
  5. /l2/rlineto ldf
  6. /gs/gsave ldf
  7. /gr/grestore ldf
  8. /np/newpath ldf
  9. /sv/save ldf
  10. /rs/restore ldf
  11. /tl/translate ldf
  12. /mt/matrix ldf
  13. /l/length ldf
  14. /z/dict ldf
  15. /d/def ldf
  16. /e/exch ldf
  17. /a/array ldf
  18. /ac/arc ldf
  19. /an/arcn ldf
  20. /b/begin ldf
  21. /pi/putinterval ldf
  22. /t/moveto ldf
  23. /lo/lineto ldf
  24. /st/stroke ldf
  25. /p/add ldf
  26. /s/sub ldf
  27. /c/mul ldf
  28. /v/div ldf
  29. /cp/closepath ldf
  30. /sl/scale ldf
  31. /ff/findfont ldf
  32. /mf/makefont ldf
  33. /sf/setfont ldf
  34. /f/fill ldf
  35. /sw/setlinewidth ldf
  36. /sc/setlinecap ldf
  37. /sj/setlinejoin ldf
  38. /sg/setgray ldf
  39. /ski/ISOLatin1Encoding where{pop true}{false}ifelse d
  40. /fcd{ff dup l z b{1 index /FID ne{d}{pop pop}ifelse}forall /Encoding ISOLatin1Encoding d currentdict end}bdf
  41. /fdf{e definefont pop}bdf
  42. /sdt 22 z d
  43. sdt b
  44. /tpm mt d
  45. /tpt mt d
  46. /tps mt d
  47. /cps
  48. {/pr2 e cvlit d
  49. /pr1 e cvlit d
  50. /npc pr1 l pr2 l p a d
  51. npc 0 pr1 pi
  52. npc pr1 l pr2 pi
  53. npc cvx
  54. }bdf
  55. /rmx mt d
  56. /frs
  57. {72 0 rmx defaultmatrix dtransform
  58. /yres e d /xres e d
  59. xres dup c yres dup c p sqrt
  60. }bdf
  61. end
  62. /sus 
  63. {sdt b
  64. /spf e d
  65. /sag e d 
  66. /ces e d
  67. 300 ces v sag /spf load
  68. setscreen
  69. end
  70. }bdf
  71. /spt 18 z d
  72. spt b
  73. /bts
  74. {/ybit e d /xbit e d
  75. /byv bstr ybit bwd c xbit 8 idiv
  76. p get d
  77. /mask 1 7 xbit 8 mod s bitshift d
  78. byv mask and 0 ne
  79. }bdf
  80. end
  81. /bsf
  82. {spt b
  83. /y e d /x e d
  84. /xix x 1 p 2 v bpx c cvi d
  85. /yix y 1 p 2 v bpy c cvi d
  86. xix yix bts
  87. {/onb onb 1 p d 1}
  88. {/ofb ofb 1 p d 0}
  89. ifelse
  90. end
  91. }bdf
  92. /setpattern
  93. {spt b
  94. /csz e d
  95. /agl e d
  96. /bwd e d
  97. /bpy e d
  98. /bpx e d
  99. /bstr e d
  100. /onb 0 d /ofb 0 d
  101. csz agl /bsf load
  102. sus
  103. { }settransfer
  104. ofb ofb onb p v setgray
  105. end
  106. }bdf
  107. /picstr 500 string d
  108. /inch{72 c}bdf
  109. /DP{gs np 0 360 ac cp f gr}bdf
  110. /DL{gs np t lo st gr}bdf
  111. /RGB{setrgbcolor}bdf
  112. /C{gs t show gr}bdf
  113.  
  114. /ren 12 z d
  115. /REn
  116. {ren b
  117. /nwc e d
  118. /nwf e d
  119. /bft e d
  120. /bfd bft ff d
  121. /nf bfd maxlength z d
  122. bfd
  123. {e dup /FID ne 
  124. {dup /Encoding eq
  125. {e dup l a copy
  126. nf 3 1 roll put}
  127. {e nf 3 1 roll put}
  128. ifelse
  129. }
  130. {pop pop}
  131. ifelse
  132. }forall
  133. nf /FontName nwf put
  134. nwc aload pop
  135. nwc l 2 idiv
  136. {nf /Encoding get 3 1 roll put}
  137. repeat
  138. nwf nf definefont pop
  139. end
  140. }d
  141. /rots{gs t rotate show gr}bdf
  142.